import {
  getListByParams,
} from "@/api/system/user";

export const tableConfig = {
  hasPage: true,
  pageIndexKey: 'current',
  hasIndex: true,
  request: (params) => {
    return getListByParams(params)
  },
  dataParse: (res) => {
    const resData = res.data.data || {}
    const data = {
      list: resData.records,
      total: resData.total
    }
    return data
  },
  columns: [
    {
      prop: 'account',
      label: '登录账号',
    },
    {
      prop: 'deptName',
      label: '所属城市',
    },
    {
      prop: 'phone',
      label: '手机号码',
    },
    {
      prop: 'email',
      label: '邮箱',
    },
    {
      prop: 'operate',
      label: '操作',
      isSlot: true,
    }
  ]
}